

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>Ceph iSCSI 网关的监控 &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />

  
  
    <link rel="shortcut icon" href="../../_static/favicon.ico"/>
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/jquery.js"></script>
        <script src="../../_static/underscore.js"></script>
        <script src="../../_static/doctools.js"></script>
    
    <script type="text/javascript" src="../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../genindex/" />
    <link rel="search" title="Search" href="../../search/" />
    <link rel="next" title="RBD on Windows" href="../rbd-windows/" />
    <link rel="prev" title="iSCSI Initiator for VMware ESX" href="../iscsi-initiator-esx/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../">Ceph 块设备</a> &raquo;</li>
        
          <li><a href="../rbd-integrations/">Ceph 块设备与第三方对接</a> &raquo;</li>
        
          <li><a href="../iscsi-overview/">Ceph iSCSI Gateway</a> &raquo;</li>
        
      <li>Ceph iSCSI 网关的监控</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../_sources/rbd/iscsi-monitoring.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../">
          

          
            
            <img src="../../_static/logo.png" class="logo" alt="Logo"/>
          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../start/intro/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../">Ceph 块设备</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../rados-rbd-cmds/">基本命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rbd-operations/">运维</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../rbd-integrations/">对接</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../rbd-ko/">内核模块</a></li>
<li class="toctree-l3"><a class="reference internal" href="../qemu-rbd/">QEMU</a></li>
<li class="toctree-l3"><a class="reference internal" href="../libvirt/">libvirt</a></li>
<li class="toctree-l3"><a class="reference internal" href="../rbd-kubernetes/">Kubernetes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../rbd-nomad/">Nomad</a></li>
<li class="toctree-l3"><a class="reference internal" href="../rbd-openstack/">OpenStack</a></li>
<li class="toctree-l3"><a class="reference internal" href="../rbd-cloudstack/">CloudStack</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../iscsi-overview/">LIO iSCSI Gateway</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="../iscsi-requirements/">Requirements</a></li>
<li class="toctree-l4"><a class="reference internal" href="../iscsi-targets/">Configuring the iSCSI Target</a></li>
<li class="toctree-l4"><a class="reference internal" href="../iscsi-initiators/">Configuring the iSCSI Initiators</a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#">Monitoring the iSCSI Gateways</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../rbd-windows/">Windows</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../man/">手册页</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api/">APIs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <div class="section" id="ceph-iscsi">
<h1>Ceph iSCSI 网关的监控<a class="headerlink" href="#ceph-iscsi" title="Permalink to this headline">¶</a></h1>
<p>Ceph provides a tool for iSCSI gateway environments
to monitor performance of exported RADOS Block Device (RBD) images.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">gwtop</span></code> tool is a <code class="docutils literal notranslate"><span class="pre">top</span></code>-like tool that displays aggregated
performance metrics of RBD images that are exported to clients over
iSCSI. The metrics are sourced from a Performance Metrics Domain Agent
(PMDA). Information from the Linux-IO target (LIO) PMDA is used to list
each exported RBD image, the connected client, and its associated I/O
metrics.</p>
<p><strong>Requirements:</strong></p>
<ul class="simple">
<li><p>A running Ceph iSCSI gateway</p></li>
</ul>
<p><strong>Installing:</strong></p>
<ol class="arabic">
<li><p>As <code class="docutils literal notranslate"><span class="pre">root</span></code>, install the <code class="docutils literal notranslate"><span class="pre">ceph-iscsi-tools</span></code> package on each iSCSI
gateway node:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># yum install ceph-iscsi-tools</span>
</pre></div>
</div>
</li>
<li><p>As <code class="docutils literal notranslate"><span class="pre">root</span></code>, install the performance co-pilot package on each iSCSI
gateway node:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># yum install pcp</span>
</pre></div>
</div>
</li>
<li><p>As <code class="docutils literal notranslate"><span class="pre">root</span></code>, install the LIO PMDA package on each iSCSI gateway node:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># yum install pcp-pmda-lio</span>
</pre></div>
</div>
</li>
<li><p>As <code class="docutils literal notranslate"><span class="pre">root</span></code>, enable and start the performance co-pilot service on
each iSCSI gateway node:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># systemctl enable pmcd</span>
<span class="c1"># systemctl start pmcd</span>
</pre></div>
</div>
</li>
<li><p>As <code class="docutils literal notranslate"><span class="pre">root</span></code>, register the <code class="docutils literal notranslate"><span class="pre">pcp-pmda-lio</span></code> agent:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">/</span><span class="n">var</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">pcp</span><span class="o">/</span><span class="n">pmdas</span><span class="o">/</span><span class="n">lio</span>
<span class="o">./</span><span class="n">Install</span>
</pre></div>
</div>
</li>
</ol>
<p>By default, <code class="docutils literal notranslate"><span class="pre">gwtop</span></code> assumes the iSCSI gateway configuration object is
stored in a RADOS object called <code class="docutils literal notranslate"><span class="pre">gateway.conf</span></code> in the <code class="docutils literal notranslate"><span class="pre">rbd</span></code> pool.
This configuration defines the iSCSI gateways to contact for gathering
the performance statistics. This can be overridden by using either the
<code class="docutils literal notranslate"><span class="pre">-g</span></code> or <code class="docutils literal notranslate"><span class="pre">-c</span></code> flags. See <code class="docutils literal notranslate"><span class="pre">gwtop</span> <span class="pre">--help</span></code> for more details.</p>
<p>The LIO configuration determines which type of performance statistics to
extract from performance co-pilot. When <code class="docutils literal notranslate"><span class="pre">gwtop</span></code> starts it looks at the
LIO configuration, and if it find user-space disks, then <code class="docutils literal notranslate"><span class="pre">gwtop</span></code>
selects the LIO collector automatically.</p>
<p><strong>Example ``gwtop`` Outputs</strong></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">gwtop</span>  <span class="mi">2</span><span class="o">/</span><span class="mi">2</span> <span class="n">Gateways</span>   <span class="n">CPU</span><span class="o">%</span> <span class="n">MIN</span><span class="p">:</span>  <span class="mi">4</span> <span class="n">MAX</span><span class="p">:</span>  <span class="mi">5</span>    <span class="n">Network</span> <span class="n">Total</span> <span class="n">In</span><span class="p">:</span>    <span class="mi">2</span><span class="n">M</span>  <span class="n">Out</span><span class="p">:</span>    <span class="mi">3</span><span class="n">M</span>   <span class="mi">10</span><span class="p">:</span><span class="mi">20</span><span class="p">:</span><span class="mi">00</span>
<span class="n">Capacity</span><span class="p">:</span>   <span class="mi">8</span><span class="n">G</span>    <span class="n">Disks</span><span class="p">:</span>   <span class="mi">8</span>   <span class="n">IOPS</span><span class="p">:</span>  <span class="mi">503</span>   <span class="n">Clients</span><span class="p">:</span>  <span class="mi">1</span>   <span class="n">Ceph</span><span class="p">:</span> <span class="n">HEALTH_OK</span>          <span class="n">OSDs</span><span class="p">:</span>   <span class="mi">3</span>
<span class="n">Pool</span><span class="o">.</span><span class="n">Image</span>       <span class="n">Src</span>    <span class="n">Size</span>     <span class="n">iops</span>     <span class="n">rMB</span><span class="o">/</span><span class="n">s</span>     <span class="n">wMB</span><span class="o">/</span><span class="n">s</span>   <span class="n">Client</span>
<span class="n">iscsi</span><span class="o">.</span><span class="n">t1703</span>             <span class="mi">500</span><span class="n">M</span>        <span class="mi">0</span>      <span class="mf">0.00</span>      <span class="mf">0.00</span>
<span class="n">iscsi</span><span class="o">.</span><span class="n">testme1</span>           <span class="mi">500</span><span class="n">M</span>        <span class="mi">0</span>      <span class="mf">0.00</span>      <span class="mf">0.00</span>
<span class="n">iscsi</span><span class="o">.</span><span class="n">testme2</span>           <span class="mi">500</span><span class="n">M</span>        <span class="mi">0</span>      <span class="mf">0.00</span>      <span class="mf">0.00</span>
<span class="n">iscsi</span><span class="o">.</span><span class="n">testme3</span>           <span class="mi">500</span><span class="n">M</span>        <span class="mi">0</span>      <span class="mf">0.00</span>      <span class="mf">0.00</span>
<span class="n">iscsi</span><span class="o">.</span><span class="n">testme5</span>           <span class="mi">500</span><span class="n">M</span>        <span class="mi">0</span>      <span class="mf">0.00</span>      <span class="mf">0.00</span>
<span class="n">rbd</span><span class="o">.</span><span class="n">myhost_1</span>      <span class="n">T</span>       <span class="mi">4</span><span class="n">G</span>      <span class="mi">504</span>      <span class="mf">1.95</span>      <span class="mf">0.00</span>   <span class="n">rh460p</span><span class="p">(</span><span class="n">CON</span><span class="p">)</span>
<span class="n">rbd</span><span class="o">.</span><span class="n">test_2</span>                <span class="mi">1</span><span class="n">G</span>        <span class="mi">0</span>      <span class="mf">0.00</span>      <span class="mf">0.00</span>
<span class="n">rbd</span><span class="o">.</span><span class="n">testme</span>              <span class="mi">500</span><span class="n">M</span>        <span class="mi">0</span>      <span class="mf">0.00</span>      <span class="mf">0.00</span>
</pre></div>
</div>
<p>In the <em>Client</em> column, <code class="docutils literal notranslate"><span class="pre">(CON)</span></code> means the iSCSI initiator (client) is
currently logged into the iSCSI gateway. If <code class="docutils literal notranslate"><span class="pre">-multi-</span></code> is displayed,
then multiple clients are mapped to the single RBD image.</p>
</div>



           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="../rbd-windows/" class="btn btn-neutral float-right" title="RBD on Windows" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="../iscsi-initiator-esx/" class="btn btn-neutral float-left" title="iSCSI Initiator for VMware ESX" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).

    </p>
  </div> 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>